using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class mainSource : MonoBehaviour {
	
	public enum Modes
	{
		splash,
		playing,
		menu,
		settings
	}
	
	public static Modes CurrentMode;
	
	void Start () 
	{
		Application.targetFrameRate = 32;
		
		Random.seed = Random.Range(0, 24124);

		CurrentMode = Modes.playing;
	}
	
	// Update is called once per frame
	void Update () 
	{
		
		if (CurrentMode == Modes.playing)
		{
			if (Objects.ObjectsCount < 40)
			{
				Objects.Cuberoid Test = new Objects.Cuberoid(Objects.BehaviorType.cuberoid);
				Test.Self.transform.position = new Vector3(Random.Range (-20, 20), Random.Range (-20, 20), Random.Range (10f, 110f));	
			}
			
			// Control | Accelerometer
			
		}
	}
	
	// DEBUG
	void OnGUI()
	{
		GUI.Label (new Rect(10, 10, 200, 20), "pitch: " + Mathf.RoundToInt(Input.acceleration.x * 360));
		GUI.Label (new Rect(10, 30, 200, 20), "yaw: " + Mathf.RoundToInt(Input.acceleration.y * 360));
		GUI.Label (new Rect(10, 50, 200, 20), "roll: " + Mathf.RoundToInt(Input.acceleration.z * 360));
	}
}
